package com.alpha.eceasy.mall.service;

import com.alpha.eceasy.extension.BaseService;
import com.alpha.eceasy.mall.api.dto.MallCommodityDTO;
import com.alpha.eceasy.mall.api.entity.MallCommodity;
import com.alpha.eceasy.mall.api.vo.MallCommodityVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.io.Serializable;

public interface MallCommodityService extends BaseService<MallCommodity> {
    MallCommodityVO getByGuid(Serializable guid);

    /**
     * 分页查询
     *
     * @param page      分页
     * @param commodity 商品与关系
     * @return 分页结果
     */
    IPage<MallCommodityVO> getMallCommodityPage(Page<MallCommodity> page, MallCommodity commodity);

    /**
     * @return commodityGuid 商品guid
     */
    String save(MallCommodityDTO dto);
}
